package org.dsbackend.entity;

public class ResultException extends RuntimeException {
    private static final long serialVersionUID = 7308244156468177248L;//不要继承Exception ，Spring只对你的异常是RuntimeException的才会进行事务回滚

    private Integer code;

    public ResultException(Integer code,String message) {
        super(message);//父类本身就有message
        this.code = code;
    }

    public Integer getCode() {
        return code;
    }

    public void setCode(Integer code) {
        this.code = code;
    }
}
